package com.ay.wiki_plt.service.Impl;

import com.ay.wiki_plt.domain.vo.StatisticResp;
import com.ay.wiki_plt.mapper.EbookSnapshotMapper;
import com.ay.wiki_plt.service.EbookSnapshotService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class EbookSnapshotServiceImpl implements EbookSnapshotService {

    @Resource
    private EbookSnapshotMapper ebookSnapshotMapper;

    /*生成快照*/
    @Override
    public void genSnapshot() {
        ebookSnapshotMapper.genSnapshot();
    }


    /*获取首页数值数据: 总阅读数、总点赞数、今日阅读数、今日点赞数、今日预计阅读数、今日预计阅读增长*/
    @Override
    public List<StatisticResp> getStatistic() {
        return ebookSnapshotMapper.getStatistic();
    }
}
